<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<SCRIPT>if(dialogArguments.titulo) document.write("<title>"+dialogArguments.titulo+"</title>") </SCRIPT>
	   <SCRIPT TYPE="text/javascript" SRC="js/jquery.js"></SCRIPT>
      <!-- desktop: -->
      <SCRIPT TYPE="text/javascript" SRC="js/DrDesktop_resources.js"></SCRIPT>
	   <SCRIPT TYPE="text/javascript" SRC="js/DrDesktop_ventanas.js"></SCRIPT> 	
      <SCRIPT>

      	if (window.dialogArguments!=null)
            window.losBotones=dialogArguments.botones
         else
            window.losBotones=[
               {texto:"Aceptar", retorna:1}
            ]

         function createButtonsHTML(losBotones){
            var html=[]
            for (var r=0;r<losBotones.length;r++)  {
          		if (losBotones[r].retorna != null)      
                  html[html.length]="<button class=\"dialogButtonStructure dialogButton\" onclick=\"drOnMouseDownBtnModal("+r+")\">"+losBotones[r].texto+"</button>"
         		else if (losBotones[r].js !=null)	
                  html[html.length]="<button class=\"dialogButtonStructure dialogButton\" onclick=\"drOnMouseDownBtnJs("+r+")\">"+losBotones[r].texto+"</button>"
            }
            return html.join('')
         }

         function drOnMouseDownBtnModal(r)   {
            window.returnValue=losBotones[r].retorna
            close();
         }

         function drOnMouseDownBtnJs(r)   {
            eval(losBotones[r].js)
            close();
         }

         function getCssHtml(){
            oProps= drWindow.getDesktopProperties()
            if (oProps){
               var urlCss= oProps.urlSkins+'/'+drWindow.getSkin()+'/css/style.css'
               return '<link rel="stylesheet" type="text/css" href="'+ urlCss +'">'
            }
            return ""
         }

         function getDialogHtml(losBotones){
            oSkData=drWindow.getSkinData()
            if (oSkData.getHtmlDialogFunction!=null)
               return oSkData.getHtmlDialogFunction(losBotones)
            return defaultHTML(losBotones)
         }

         function defaultHTML(losBotones){
            html=[]
            html[html.length]="            <div class=\"dialogBoxStructure dialogBox\">";
            html[html.length]="               <div id=\"dialogLabel\" class=\"dialogLabelStructure dialogLabel\">"+dialogArguments.texto+"</div>";
            html[html.length]="               <div id=\"dialogButtons\" class=\"dialogButtonsStructure\">";
            html[html.length]=                     createButtonsHTML(losBotones);
            //html[html.length]="                  <button class=\"dialogButtonStructure dialogButton\">Si</button>";
            //html[html.length]="                  <button class=\"dialogButtonStructure dialogButton\">No</button>";
            html[html.length]="               </div>";
            html[html.length]="            </div>";
            return html.join('');
         }

      </SCRIPT>
      <STYLE>

         html , body {height:100%; margin:0px;}

         .dialogBoxStructure{position:relative; width:370px; height:164px}
         .dialogBox{background-image:url(img/dialogBoxBg.jpg);background-repeat: no-repeat;}

         .dialogLabelStructure{position:absolute; width:340px; height:55px; top:73px; left:15px; overflow:auto;}
         .dialogLabel{font-family: Arial, Helvetica, sans-serif; font-size:12px; font-weight: bold;}

         .dialogButtonsStructure{position:absolute; right:11px; bottom:9px;}
         .dialogButtonStructure{width: 58px; height:20px; margin-left:6px;}
         .dialogButton{cursor:pointer; border:1px solid #9c9c9c; background-color:white; font-family: Arial, Helvetica, sans-serif; font-size:11px; }

      </STYLE>
      <SCRIPT>document.write(getCssHtml())</SCRIPT>
   </head>

   <body>
      <SCRIPT>
         document.write(getDialogHtml(losBotones))
      </SCRIPT>
      <!--
      <div class="dialogBoxStructure dialogBox">
         <div id="dialogLabel" class="dialogLabelStructure dialogLabel"><SCRIPT>document.write(dialogArguments.texto)</SCRIPT></div>
         <div id="dialogButtons" class="dialogButtonsStructure">
            <script>document.write(createButtonsHTML(losBotones))</script>
         </div>
      </div>
      -->
   </body>
</html>